import { initializeApp } from "firebase/app";
import { getAnalytics, logEvent } from "firebase/analytics";
import Vue from 'vue'
const FirebasePlugin = () => {
	const firebaseConfig = {
		apiKey: "AIzaSyD9IQQpfbGH4Zz0_IYXzgbkOgErescQfkc",
		authDomain: "oopbut-web.firebaseapp.com",
		projectId: "oopbut-web",
		storageBucket: "oopbut-web.appspot.com",
		messagingSenderId: "539281377478",
		appId: "1:539281377478:web:f8e4498f6ae95bac7dafc7",
		measurementId: "G-7E7JR3D31E"
	};
	// Initialize Firebase
	const appInitialize = initializeApp(firebaseConfig);
	const analytics = getAnalytics(appInitialize);
	Vue.prototype.$analytics = {
		logEvent: function (key, params) {
			logEvent(analytics, key, params)
		}
	}
}
export default FirebasePlugin;